import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:龙宝
 * Date:2023-11-16
 * Time:9:33
 */
public class Thread7 {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newCachedThreadPool();
        pool.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("bbbbb");
            }
        });
        ExecutorService pool2 = Executors.newFixedThreadPool(5);
        pool2.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("nnnn");
            }
        });
        ExecutorService pool3 = Executors.newSingleThreadExecutor();
        pool3.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("oaia");
            }
        });
    }
}
